<!DOCTYPE html>
<meta charset="utf-8">
<title></title>
<style>
  * {
    margin: 0;
    padding: 0;
    font-size: 0;
  }
  .red {
    left: 50%;
    position: absolute;
    top: 40px;
    width: 480px;
    margin-left: -240px;
    background: red;
  }
  .green {
    display: block;
    width: 410px;
    height: 34px;
    line-height: 34px;
    background: green;
    border: none
  }
</style>

<div class="red"><div class="green"></div>

